import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import router from './router'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import piniaPluginPersistedstate from "pinia-plugin-persistedstate";

//实例化app
const app = createApp(App)

//导入icon图标库
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
}
//pinia持久化
const pinia = createPinia();
pinia.use(piniaPluginPersistedstate);
app.use(pinia)

//挂载路由
app.use(router)

//挂载到app上
app.mount('#app')
